Make format strings consistent for -vs output.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 16 Jan 2004 16:34:52 +0000 (16:34 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 16 Jan 2004 16:34:52 +0000 (16:34 +0000)
gpsbabel/garmin.c
gpsbabel/magproto.c
gpsbabel/waypt.c

index f1f4bf690990934c9efb004f89d387285cbb7c3f..d36650d911836ad6d364120e2bea0518d001846d 100644 (file)
@@ -308,9 +308,11 @@ static int
 waypt_write_cb(GPS_PWay *way)
 {
        static int i;
+       int n = waypt_count();
 
        if (global_opts.verbose_status) {
-               fprintf(stdout, "%d\r", ++i*100/waypt_count());
+               i++;
+               fprintf(stdout, "%d/%d/%d\r", i*100/n, i, n);
                fflush(stdout);
        }
        return 0;
index 56c65d167ede1984aece188035b25fa78fd070ee..5ec4fdb80bb5370a96ce5d941be0f32a9d3d5310 100644 (file)
@@ -389,7 +389,6 @@ retry:
                         * we'll be fairly persistent in retrying.
                         */
                        if (retrycnt--) {
-                               warning( "%d\n", retrycnt);
                                goto retry;
                        } else {
                                fatal(MYNAME ": No data received from GPS.\n");
index 8e082d6a184429af7fc334abfd4271aa01738de3..51c7f0f90aa53450c48aa081899aa3cde2540d35 100644 (file)
@@ -142,7 +142,8 @@ waypt_disp_all(waypt_cb cb)
        QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
                waypointp = (waypoint *) elem;
                if (global_opts.verbose_status) {
-                       fprintf(stdout, "%d\r", ++i*100/waypt_ct);
+                       i++;
+                       fprintf(stdout, "%d/%d/%d\r", i*100/waypt_ct, i, waypt_ct);
                        fflush(stdout);
                }
                (*cb) (waypointp);